{% extends "base.html" %}

{% block title %}mobeir{% endblock %}

{% block head %}
<link href="/medias/css/device.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
$(function(){
	$(".bevel_top").corner("bevel top");
	$(".bevel_button").corner("bottom");

});	   
</script>
{% endblock %}

{% block left_content %}
<div id="content_header" class="bevel_top">
	<ul >
		<li {% ifequal header "all" %}class="active corner"{% endifequal %}><a href="/device/os/all/">所有平台</a></li>
        <li {% ifequal header "android" %}class="active corner"{% endifequal %}><a href="/device/os/android/">android</a></li>
		<li {% ifequal header "iphone" %}class="active corner"{% endifequal %}><a href="/device/os/iphone/">iphone</a></li>
		<li {% ifequal header "symbian" %}class="active corner"{% endifequal %}><a href="/device/os/symbian/">symbian</a></li>
        <li {% ifequal header "webos" %}class="active corner"{% endifequal %}><a href="/device/os/webos/">webos</a></li>
        <li {% ifequal header "blackberry" %}class="active corner"{% endifequal %}><a href="/device/os/blackberry/">BlackBerry</a></li>
        <li {% ifequal header "other" %}class="active corner"{% endifequal %}><a href="/device/os/other/"> 其他</a></li>  
	</ul>
</div> 

<div id="devicelist">
	{% for device in devices %}
	<div class="imgPro">
		<div class="imga"><a href="/device/detail/{{device.id}}" ><img alt="{{device.name}}"  src="{{device.image.url_125x125|default:"image/default.jpg"}}"/></a></div>
		<div class="title">{{device.name}}</div>	
	</div>
	{% endfor %}	
</div>


{% endblock %}

{% block right_content %}

{% if request.user.is_staff %}
<div id="right_button" class="corner iecorner"><a href="/device/add/">提交新机型</a></div></br>
{% endif %}

<div class="hot_tag">
<h3><span class="sLeft">热门标签</span><span class="sRight"></span></h3>
	<ul>
	{% for tag in tags %}
    <li><a href="/device/tag/{{tag.name}}">{{tag.name}}({{tag.dev_count}})</a></li>
	{% endfor %}
	</ul>
</div>

<div id="hotCont">
	<h3><span class="sLeft">活跃主题</span><span class="sRight"></span></h3>
	<ul>
		{% for topic in topics %}	
		<li><a target="_blank" href="/topic/{{topic.id}}/">{{topic.title|slice:":22"|escape}}</a>...   评论：{{topic.replies_count}}</li>
	    {% endfor %}
	</ul>	
		
</div>
		
{% endblock %}
